import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;

public class wanquanshu_test {
    public static void main(String[] args) {
        boolean temp = false;
        int a;
        int sum;
        System.out.println("请输入一个数");
        Scanner reader = new Scanner(System.in);
        a = reader.nextInt();
        List m;
        m = panduan(a);
        sum = Sum(m);
        if(sum==a){
            temp = true;
        }

        if(temp){
            System.out.println("它是一个完全数");
        }
        else{
            System.out.println("它不是一个完全数");
        }
    }
    static List panduan(int a){
        List list = new ArrayList();
        for(int i = 1;i<=a;i++){
            if(a%i==0){
                list.add(i);
            }
        }
        return list;
    }
    static int Sum(List list){
        int total = 0;
        Iterator it = list.iterator();
        while(it.hasNext()){
            total=total + (int)it.next();
        }
        return total;
    }


}

